<?php
/**
 * Created by PhpStorm.
 * User: 17828
 * Date: 2018/10/10
 * Time: 9:21
 */
namespace app\common\model;
use think\Model;
class Store extends Model
{
    public function getStoreId($id){
        $store_id = $this->where('admin_id',$id)->value('store_id');
        return $store_id;
    }
    public function getStoreList($where){
        $store = db('store')->alias('s')
            ->field('s.*')
            ->join('admin a','a.admin_id = s.admin_id')
            ->where($where)
            ->select();
        return $store;
    }

}